package com.mq;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageListener;

import java.io.UnsupportedEncodingException;

public class OrderQueueListener implements MessageListener {

    @Override
    public void onMessage(Message message) {
        try {
            System.out.print("Received msg : " + new String(message.getBody(),"UTF-8"));
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }

//        System.out.print("Received msg : ");
    }
}
